<template>
  <div>
    <vxe-table
        border
        row-id="id"
        :data="tableData"
        :tree-config="{ children: 'children', expandAll: true }"
    >
      <vxe-table-column
          type="seq"
          width="180"
          title="序号"
          tree-node
      ></vxe-table-column>
      <vxe-table-column field="name" title="导航名称"></vxe-table-column>
      <vxe-table-column field="url" title="URL"></vxe-table-column>
    </vxe-table>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: [
        {
          seq: 1,
          name: "系统管理",
          url: "",
          children: [
            {
              seq: 10,
              name: "用户管理",
              url: "sys/user"
            },
            {
              seq: 11,
              name: "权限管理",
              url: "sys/right"
            },
            {
              seq: 12,
              name: "角色管理",
              url: "sys/role"
            }
          ]
        },
        {
          seq: 2,
          name: "报表管理",
          url: "report"
        }
      ]
    };
  }
};
</script>